function popupDiv(div_id, w, h){
    var div_obj = $("#" + div_id);
    var windowWidth = $(document).width();
    var windowHeight = $(document).height();
    var popupHeight =div_obj.width();
    var popupWidth = div_obj.height();
    var lefts=($(window).width() - popupWidth)/2+$(document).scrollLeft();	
    var tops=($(window).height() - popupHeight)/ 2+$(document).scrollTop();
   
    $("<div id='mask'></div>").css({
    'z-index': 7,
    'color':'#000000',
    'background-color':'#000000',
    'position':'absolute',
    'top':0,
    'left':0,
    'width':windowWidth,
    'height':windowHeight,
	opacity:'0.8'
    }).appendTo("body");
    div_obj.css({
    'z-index': '200',
    "position": "absolute",
    'top': tops,
	'left':lefts
    }).animate({
        opacity: "show"
    }, 100);
}

function hideDiv(div_id){
    $("#mask").remove();
    $("#" + div_id).animate({
        opacity: "hide"
    }, 100);
}